package com.mic.yzzn.plc.core.plcevents;

import com.mic.yzzn.plc.common.ins.datastructure.PLCInstructionTuple;

import java.util.ArrayList;
import java.util.EventObject;

/**
 * Created by ASH on 16/7/17.
 * 用于 COM 口采集返回响应的事件
 */
public class PLCFeedbackEvent extends EventObject {

    /** 指令执行的结果 */
    private PLCInstructionTuple result;
    /** 多指令执行结果 */
    private ArrayList<PLCInstructionTuple> resultArray;

    public PLCFeedbackEvent(Object source) {
        super(source);
    }

    public PLCFeedbackEvent(Object source, PLCInstructionTuple result) {
        super(source);
        this.result = result;
    }

    public PLCFeedbackEvent(Object source, ArrayList<PLCInstructionTuple> resultArray) {
        super(source);
        this.resultArray = resultArray;
    }

    public PLCInstructionTuple getResult() {
        return result;
    }

    public ArrayList<PLCInstructionTuple> getResultArray() {
        return resultArray;
    }
}
